package com.heima.apis.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.model.wemedia.dtos.ChannelDto;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.dtos.SensitiveDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {

    /**
     * 频道模糊查询
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult findList(@RequestBody ChannelDto dto);

    /**
     * 新增频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    public  ResponseResult saveChannel(@RequestBody WmChannel wmChannel);

    /**
     * 删除频道
     * @param id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult deleteChannelById(@PathVariable("id") Integer id);

    /**
     * 修改频道
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    public ResponseResult updateChannel(@RequestBody WmChannel wmChannel);

    /**
     * 开通自媒体账号
     * @param apUser
     * @return
     */
    @PostMapping("/save")
    public ResponseResult saveWmUser(@RequestBody ApUser apUser);


    /**
     * 删除敏感词
     * @param id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult deleteSensitive(@PathVariable("id") Integer id);

    /**
     * 查询敏感词列表
     */
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult findList(@RequestBody SensitiveDto dto);

    /**
     * 新增敏感词
     * @param wmSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult saveSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * 修改敏感词
     * @param wmSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

    /**
     * 人工审核 查询文章列表
     */
    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult adminFindList(@RequestBody NewsAuthDto dto);

    /**
     * 查看文字详情
     * @return
     */
    @GetMapping("/api/v1/news/one_vo/{id}")
    public ResponseResult newsDetails(@PathVariable("id") Integer id);

    /**
     * 审核失败
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto);
    /**
     * 审核通过
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto);
}
